3.26 \(\int \frac{A+B x}{x \sqrt{a+b x^2}} \, dx\)

Optimal. Leaf size=53 \[ \frac{B \tanh ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a+b x^2}}\right )}{\sqrt{b}}-\frac{A \tanh ^{-1}\left (\frac{\sqrt{a+b x^2}}{\sqrt{a}}\right )}{\sqrt{a}} \]

[Out]

(B*ArcTanh[(Sqrt[b]*x)/Sqrt[a + b*x^2]])/Sqrt[b] - (A*ArcTanh[Sqrt[a + b*x^2]/Sq
rt[a]])/Sqrt[a]

_______________________________________________________________________________________

Rubi [A]  time = 0.132796, antiderivative size = 53, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 6, integrand size = 20, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.3 \[ \frac{B \tanh ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a+b x^2}}\right )}{\sqrt{b}}-\frac{A \tanh ^{-1}\left (\frac{\sqrt{a+b x^2}}{\sqrt{a}}\right )}{\sqrt{a}} \]

Antiderivative was successfully verified.

[In]  Int[(A + B*x)/(x*Sqrt[a + b*x^2]),x]

[Out]

(B*ArcTanh[(Sqrt[b]*x)/Sqrt[a + b*x^2]])/Sqrt[b] - (A*ArcTanh[Sqrt[a + b*x^2]/Sq
rt[a]])/Sqrt[a]

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 11.2993, size = 48, normalized size = 0.91 \[ - \frac{A \operatorname{atanh}{\left (\frac{\sqrt{a + b x^{2}}}{\sqrt{a}} \right )}}{\sqrt{a}} + \frac{B \operatorname{atanh}{\left (\frac{\sqrt{b} x}{\sqrt{a + b x^{2}}} \right )}}{\sqrt{b}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((B*x+A)/x/(b*x**2+a)**(1/2),x)

[Out]

-A*atanh(sqrt(a + b*x**2)/sqrt(a))/sqrt(a) + B*atanh(sqrt(b)*x/sqrt(a + b*x**2))
/sqrt(b)

_______________________________________________________________________________________

Mathematica [A]  time = 0.0574139, size = 67, normalized size = 1.26 \[ -\frac{A \log \left (\sqrt{a} \sqrt{a+b x^2}+a\right )}{\sqrt{a}}+\frac{A \log (x)}{\sqrt{a}}+\frac{B \log \left (\sqrt{b} \sqrt{a+b x^2}+b x\right )}{\sqrt{b}} \]

Antiderivative was successfully verified.

[In]  Integrate[(A + B*x)/(x*Sqrt[a + b*x^2]),x]

[Out]

(A*Log[x])/Sqrt[a] - (A*Log[a + Sqrt[a]*Sqrt[a + b*x^2]])/Sqrt[a] + (B*Log[b*x +
 Sqrt[b]*Sqrt[a + b*x^2]])/Sqrt[b]

_______________________________________________________________________________________

Maple [A]  time = 0.01, size = 52, normalized size = 1. \[{B\ln \left ( x\sqrt{b}+\sqrt{b{x}^{2}+a} \right ){\frac{1}{\sqrt{b}}}}-{A\ln \left ({\frac{1}{x} \left ( 2\,a+2\,\sqrt{a}\sqrt{b{x}^{2}+a} \right ) } \right ){\frac{1}{\sqrt{a}}}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((B*x+A)/x/(b*x^2+a)^(1/2),x)

[Out]

B*ln(x*b^(1/2)+(b*x^2+a)^(1/2))/b^(1/2)-A/a^(1/2)*ln((2*a+2*a^(1/2)*(b*x^2+a)^(1
/2))/x)

_______________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \[ \text{Exception raised: ValueError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((B*x + A)/(sqrt(b*x^2 + a)*x),x, algorithm="maxima")

[Out]

Exception raised: ValueError

_______________________________________________________________________________________

Fricas [A]  time = 0.294268, size = 1, normalized size = 0.02 \[ \left [\frac{B \sqrt{a} \log \left (-2 \, \sqrt{b x^{2} + a} b x -{\left (2 \, b x^{2} + a\right )} \sqrt{b}\right ) + A \sqrt{b} \log \left (-\frac{{\left (b x^{2} + 2 \, a\right )} \sqrt{a} - 2 \, \sqrt{b x^{2} + a} a}{x^{2}}\right )}{2 \, \sqrt{a} \sqrt{b}}, \frac{2 \, B \sqrt{a} \arctan \left (\frac{\sqrt{-b} x}{\sqrt{b x^{2} + a}}\right ) + A \sqrt{-b} \log \left (-\frac{{\left (b x^{2} + 2 \, a\right )} \sqrt{a} - 2 \, \sqrt{b x^{2} + a} a}{x^{2}}\right )}{2 \, \sqrt{a} \sqrt{-b}}, -\frac{2 \, A \sqrt{b} \arctan \left (\frac{\sqrt{-a}}{\sqrt{b x^{2} + a}}\right ) - B \sqrt{-a} \log \left (-2 \, \sqrt{b x^{2} + a} b x -{\left (2 \, b x^{2} + a\right )} \sqrt{b}\right )}{2 \, \sqrt{-a} \sqrt{b}}, \frac{B \sqrt{-a} \arctan \left (\frac{\sqrt{-b} x}{\sqrt{b x^{2} + a}}\right ) - A \sqrt{-b} \arctan \left (\frac{\sqrt{-a}}{\sqrt{b x^{2} + a}}\right )}{\sqrt{-a} \sqrt{-b}}\right ] \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((B*x + A)/(sqrt(b*x^2 + a)*x),x, algorithm="fricas")

[Out]

[1/2*(B*sqrt(a)*log(-2*sqrt(b*x^2 + a)*b*x - (2*b*x^2 + a)*sqrt(b)) + A*sqrt(b)*
log(-((b*x^2 + 2*a)*sqrt(a) - 2*sqrt(b*x^2 + a)*a)/x^2))/(sqrt(a)*sqrt(b)), 1/2*
(2*B*sqrt(a)*arctan(sqrt(-b)*x/sqrt(b*x^2 + a)) + A*sqrt(-b)*log(-((b*x^2 + 2*a)
*sqrt(a) - 2*sqrt(b*x^2 + a)*a)/x^2))/(sqrt(a)*sqrt(-b)), -1/2*(2*A*sqrt(b)*arct
an(sqrt(-a)/sqrt(b*x^2 + a)) - B*sqrt(-a)*log(-2*sqrt(b*x^2 + a)*b*x - (2*b*x^2
+ a)*sqrt(b)))/(sqrt(-a)*sqrt(b)), (B*sqrt(-a)*arctan(sqrt(-b)*x/sqrt(b*x^2 + a)
) - A*sqrt(-b)*arctan(sqrt(-a)/sqrt(b*x^2 + a)))/(sqrt(-a)*sqrt(-b))]

_______________________________________________________________________________________

Sympy [A]  time = 2.54756, size = 99, normalized size = 1.87 \[ - \frac{A \operatorname{asinh}{\left (\frac{\sqrt{a}}{\sqrt{b} x} \right )}}{\sqrt{a}} + B \left (\begin{cases} \frac{\sqrt{- \frac{a}{b}} \operatorname{asin}{\left (x \sqrt{- \frac{b}{a}} \right )}}{\sqrt{a}} & \text{for}\: a > 0 \wedge b < 0 \\\frac{\sqrt{\frac{a}{b}} \operatorname{asinh}{\left (x \sqrt{\frac{b}{a}} \right )}}{\sqrt{a}} & \text{for}\: a > 0 \wedge b > 0 \\\frac{\sqrt{- \frac{a}{b}} \operatorname{acosh}{\left (x \sqrt{- \frac{b}{a}} \right )}}{\sqrt{- a}} & \text{for}\: b > 0 \wedge a < 0 \end{cases}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((B*x+A)/x/(b*x**2+a)**(1/2),x)

[Out]

-A*asinh(sqrt(a)/(sqrt(b)*x))/sqrt(a) + B*Piecewise((sqrt(-a/b)*asin(x*sqrt(-b/a
))/sqrt(a), (a > 0) & (b < 0)), (sqrt(a/b)*asinh(x*sqrt(b/a))/sqrt(a), (a > 0) &
 (b > 0)), (sqrt(-a/b)*acosh(x*sqrt(-b/a))/sqrt(-a), (b > 0) & (a < 0)))

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.223134, size = 78, normalized size = 1.47 \[ \frac{2 \, A \arctan \left (-\frac{\sqrt{b} x - \sqrt{b x^{2} + a}}{\sqrt{-a}}\right )}{\sqrt{-a}} - \frac{B{\rm ln}\left ({\left | -\sqrt{b} x + \sqrt{b x^{2} + a} \right |}\right )}{\sqrt{b}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((B*x + A)/(sqrt(b*x^2 + a)*x),x, algorithm="giac")

[Out]

2*A*arctan(-(sqrt(b)*x - sqrt(b*x^2 + a))/sqrt(-a))/sqrt(-a) - B*ln(abs(-sqrt(b)
*x + sqrt(b*x^2 + a)))/sqrt(b)